<?php
/**
 *      [迷你云] (C)2009-2012 南京恒为网络科技.
 *   软件仅供研究与学习使用，如需商用，请访问www.miniyun.cn获得授权
 * 
 */
?>
<?php $this->pageTitle="个人详情"; ?>
<script type="text/javascript">
<!--
function  ForDight(Dight,How)    
{    
   Dight  =  Math.round  (Dight*Math.pow(10,How))/Math.pow(10,How);    
   return  Dight;    
}
//-->
</script>
<div class="icon32" id="icon-users"><br>
</div>
<h2>个人详情<a class="add-new-h2"
	href="<?php echo Yii::app()->createUrl("adminUserPanel/update&id=".$model->data->id)?>">修改用户信息</a></h2>
<div id="your-profile"><?php $form=$this->beginWidget('CActiveForm', array()); ?>
<h3><img alt=""
	src="<?php echo Yii::app()->request->baseUrl."/statics/images/myprofile.png"?>">
基本信息</h3>
<?php echo $form->errorSummary($model->data); ?>
<table class="form-table">
	<tr class="form-field form-required">
		<th scope="row"><?php echo $form->labelEx($model->data,'name'); ?>:</th>
		<td><?php echo $model->data->name;?></td>
	</tr>
	<tr class="form-field">
		<th scope="row"><?php echo $form->labelEx($model->data,'nick'); ?>:</th>
		<td><?php echo $model->data->nick;?></td>
	</tr>
	<tr class="form-field">
		<th scope="row"><?php echo $form->labelEx($model->data,'email'); ?>:</th>
		<td><?php echo $model->data->email;?></td>
	</tr>
</table>
<h3><img alt=""
	src="<?php echo Yii::app()->request->baseUrl."/statics/images/myprofile.png"?>">
使用情况统计</h3>
<?php if($model->hasData==true){?> 开始时间: <?php Yii::import('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker');
$this->widget('CJuiDateTimePicker',array(
        'model'=>$model,         'attribute'=>'startDate',         'mode'=>'date',         'options'=>array('dateFormat' => 'yy-mm-dd',  ) ));
?> 结束时间: <?php Yii::import('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker');
$this->widget('CJuiDateTimePicker',array(
        'model'=>$model,         'attribute'=>'endDate',         'mode'=>'date',         'options'=>array('dateFormat' => 'yy-mm-dd',  ) ));
?><?php echo CHtml::submitButton('查看统计',array("class"=>"button-primary")); ?>

<table class="form-table">
	<tr class="form-field form-required">
		<th scope="row"><?php echo $form->labelEx($model->data,'fileCount'); ?>:</th>
		<td><a
			href="<?php echo Yii::app()->createUrl("adminFilePanel/index&author=".$model->data->id);?>"><?php 
			echo "已经创建(".$model->data->fileCount.")个文件或目录";
			?></a></td>
	</tr>
	<tr class="form-field form-required">
		<th scope="row"><?php echo $form->labelEx($model->data,'deviceCount'); ?>:</th>
		<td><?php 
		echo "已经激活(".$model->data->deviceCount.")台设备";
		?></td>
	</tr>
	<tr class="form-field form-required">
		<th scope="row">使用统计:</th>
		<td><?php 
		$this->Widget('ext.highcharts.HighchartsWidget', array(
	   'options'=>$model->statChartPie()
		));?></td>
	</tr>
	<tr class="form-field form-required">
		<th scope="row">文件创建统计:</th>
		<td><?php 
		$this->Widget('ext.highcharts.HighchartsWidget', array(
	   'options'=>$model->statHistogram()
		));?></td>
	</tr>
</table>
<?php }else{?> 没有数据，用户还未使用 <?php }?>
<h3><img alt=""
	src="<?php echo Yii::app()->request->baseUrl."/statics/images/myprofile.png"?>">
更多个人信息</h3>
<table class="form-table">
	<tr class="form-field">
		<th scope="row"><?php echo $form->labelEx($model->data,'phone'); ?>:</th>
		<td><?php echo $model->data->phone;?></td>
	</tr>
	<tr class="form-field">
		<th scope="row"><?php echo $form->labelEx($model->data,'realName'); ?>:</th>
		<td><?php echo $model->data->realName;?></td>
	</tr>
	<tr class="form-field">
		<th scope="row"><?php echo $form->labelEx($model->data,'qq'); ?>:</th>
		<td><?php echo $model->data->qq;?></td>
	</tr>
	<tr class="form-field">
		<th scope="row"><?php echo $form->labelEx($model->data,'website'); ?>:</th>
		<td><?php echo $model->data->website;?></td>
	</tr>
	<tr class="form-field">
		<th scope="row"><?php echo $form->labelEx($model->data,'isAdmin'); ?>:<br>
		<span class="description">(可对整个系统进行后台管理)</span></th>
		<td><?php echo $model->data->statusDetail(); ?></td>
	</tr>
	<tr class="form-field">
		<th scope="row"><?php echo $form->labelEx($model->data,'space'); ?>: <br>
		<span class="description">(单位：M,1024M=1G)</span></th>
		<td><?php echo $model->data->space;?></td>
	</tr>
	<tr class="form-field">
		<th scope="row"><?php echo $form->labelEx($model->data,'memo'); ?>:<br>
		<span class="description"></span></th>
		<td><?php echo $model->data->memo;?></td>
	</tr>
</table>

<?php $this->endWidget(); ?></div>
